/**
 * AluiCommons -  http://code.google.com/p/alui-toolbox/
 * Copyright (c) 2008-2009
 * by Fabien Sanglier
 * 
 * This file is part of AluiCommons.
 * 
 * AluiCommons is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * AluiCommons is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with AluiCommons.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */

using System;
using com.plumtree.server;

namespace AluiServerLib.Business
{
	/// <summary>
	/// Summary description for MyPage.
	/// </summary>
    public class ALUIPage : BaseALUIObject, IPTPage
	{
        IPTPage m_InternalObject = null;

        public ALUIPage()
		{}

        public ALUIPage(int objid)
        {
            this.objectid = objid;
        }

        public override IPTObject GetInternal()
        {
            return m_InternalObject;
        }

        public override void Inflate(IPTSession ptSession, bool lockObject)
        {
            if (this.objectid > 0)
            {
                IPTObjectManager ptPageManager = ptSession.GetPages();
                this.m_InternalObject = (IPTPage)ptPageManager.Open(this.objectid, lockObject);
            }
        }

        #region IPTPage Members

        public void AddPortlet(int nPortletID, int nColumnID)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void AssignPortlets(int nPortletID, int nColumnID)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void AssignPortlets(int[] arrPortletIDs, int nColumnID)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public bool GetInheritPageTemplate()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public bool GetNotDeletable()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public int GetPageTemplateID()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public int GetPageType()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public int GetTopicPos()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public IPTMyPortalGadgetContent QueryPortletContent(int nPageContainerClassID, int nPageContainerObjectID, object objAppDataStateObject, string strUserInterfaceID, int nMode, bool bReturnAllPortlets)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public IPTQueryResult QueryPortlets()
        {
            return m_InternalObject.QueryPortlets();
        }

        public void RemovePortlet(int nPortletID)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void SetDefaultsFromPageTemplate(int nPageTemplateID)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void SetInheritPageTemplate(bool bInheritPageTemplate)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void SetNotDeletable(bool bIsNotDeletable)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void SetPageTemplateID(int nPageTemplateID)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void SetPageType(int nPageType)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        #endregion
    }
}
